Many electronic devices (such as mobile phones and smartphones in particular) each include an acceleration sensor for measuring an acceleration caused by movement or vibration of the electronic devices. Pedometers including such acceleration sensors have been widely used in recent years. However, in a case where the number of steps taken by a user while the user is walking is to be counted with use of a pedometer including an acceleration sensor, the pedometer may erroneously count the number of steps as a result of erroneously taking, as acceleration fluctuations caused by walking, acceleration fluctuations caused by a factor other than walking. For example, in a case where a user who carries a pedometer is seated in a vehicle such as a car or a train, the pedometer may erroneously count the number of steps based on, for example, (i) vibration that is caused by traveling of a car or a train or (ii) change in acceleration value that is measured when the car or the train starts running or stops.
Patent Literature 1 discloses a technique of preventing erroneous count of the number of steps in a case where a user is traveling by vehicle. According to this technique, determination on whether the user is traveling by vehicle is made based on a feature amount and then, a count of the number of steps is, for example, withheld depending on a result of the determination. Patent Literature 1 discloses a number-of-steps detecting device which includes (i) a number-of-steps detecting section for detecting the number of steps based on a sensor signal, (ii) a walking time measuring section for measuring a period of time during which the user is continuously walking (i.e., a continuous walking time period), (iii) a number-of-steps counting section for counting the number of steps based on the number of steps detected by the number-of-steps detecting section, (iv) a feature amount extracting section for extracting a feature amount based on the sensor signal, and (v) a determining section for determining, based on the feature amount, whether the user is traveling by vehicle. In a case where the continuous walking time period is shorter than a given period for determination of effective number of steps, the number-of-steps counting section resets a count of the number of steps detected during the continuous walking time period. In a case where it is determined that the user is traveling by vehicle, the number-of-steps counting section extends the given period for determination of effective number of steps.